package com.zhuss.controller.advice.complaint;

import com.zhuss.advice.complaint.ComplaintOperateServiceWeChat;
import com.zhuss.bean.bo.advice.Complaint.weChat.CreateComplaintWeChatBo;
import com.zhuss.common.BaseController;
import com.zhuss.exception.WpsException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: zhushanshuo
 * @Date: 2020/4/14 8:16
 */
@RestController
@RequestMapping("/complaint")
public class ComplaintOperateController extends BaseController{

    @Autowired
    @Qualifier("complaintOperateServiceWeChat")
    private ComplaintOperateServiceWeChat complaintOperateServiceWeChat;

    /**
     * 微信新建
     * @param bo
     * @throws WpsException
     */
    @ResponseBody
    @PostMapping("/weChatCreate")
    @Transactional(rollbackFor = Exception.class)
    public void weChatCreate(@RequestBody CreateComplaintWeChatBo bo) throws WpsException {
        complaintOperateServiceWeChat.weChatCreate(bo);
    }
}
